package org.example.api.admin;

import org.example.R.R;
import org.example.entity.dto.EditBasicInformationDto;
import org.example.service.BaseInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 村庄基本信息
 */

@RestController
@RequestMapping("/api/admin/baseInfo")
public class BaseInfoController {

    @Autowired
    private BaseInfoService baseInfoService;

    @PostMapping("/detail")
    public R detail() {
        return baseInfoService.detail();
    }

    @PostMapping("/edit")
    public R update(@RequestBody EditBasicInformationDto dto) {
        return baseInfoService.edit(dto);
    }

}
